<?php 
    class ArticleController{
        public function handleRequest(){
            
			$task=$_REQUEST['task'];
			$articleTable=new ArticleTableModel();
			$article=new Article();
			switch($task)
			{
				case 'add':
                    
					$data=array();
					if(isset($_POST['publish']))
					{
						$data['article_title']=$_POST['article_title'];
						$data['article_description']=$_POST['article_description'];
						$data['article_detail']=$_POST['article_detail'];
						$data['article_image']=$_POST['article_image'];
						$data['article_cat']=$_POST['article_cat'];
						$data['article_meta_title']=$_POST['article_meta_title'];
						$data['article_meta_description']=$_POST['article_meta_description'];
						$data['article_meta_keyword']=$_POST['article_meta_keyword'];
						var_dump($data);
						$article->exchangeArray($data);
						$articleTable->addArticle($article);
					}
					render_admin('add',array(),'article/');
					break;
			}
		}
	}
?>